package org.xcorpio.java8.chapter03;

import java.util.function.IntPredicate;

import org.xcorpio.java8.chapter01.PassingCode.Predicate;

public class AvoidBoxing {
    public static void main(String[] args) {
        IntPredicate evenNums = (int i) -> i % 2 == 0;
        System.out.println(evenNums.test(1000));// true(no boxing)
        Predicate<Integer> oddNums = (Integer i) -> i % 2 == 1;
        System.out.println(oddNums.test(1000));// false(boxing)
    }
}
